package review;

public class CFYS {
	
	public ListNode deleteDuplicates(ListNode head) {
		if (head != null) {
			ListNode temp = head;
			while (temp != null && temp.next != null) {
				if (temp.val == temp.next.val) {
					temp = temp.next.next;
				}
			}
		}
		return head;
	}

}
